home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d3
/
rettig.arc
/
TRSOURCE.EXE
/
MANTISSA.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-22
|
575b
|
29 lines
/*********
* MANTISSA.C
*
* by Ralph Davis
* modified by Tom Rettig
*
* Placed in the public domain by Tom Rettig Associates, 10/22/1990.
*
* Syntax: MANTISSA( <expN> )
* Return: Number times which 2^(EXPONENT(n)) is multiplied to give <expN>
*********/
#include "trlib.h"
TRTYPE mantissa()
{
if ( PCOUNT==1 && ISNUM(1) )
{
int expon;
double result, n;
n = _parnd(1);
result = _tr_frexp(n,&expon); /* Returns mantissa in result */
_retnd(result);
}
else
_retnd( (double)ERROR );
}